package cn.islys.demospringboot.service.Impl;

import cn.islys.demospringboot.domain.User;
import cn.islys.demospringboot.mapper.UserMapper;
import cn.islys.demospringboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> getUsers() {
        List<User> users = userMapper.getUsers();
        return users;
    }

    @Override
    public List<User> getUserById(int id) {
        List<User> users = userMapper.getUserById(id);
        return users;
    }
}
